<template>
    <div>
        <el-row>
            <component :is="content"></component>
            <el-col :span="20">
                <h2 class="warranty-title">个人签单查询</h2>
                <el-table
                        :data="tableData"
                        border
                >
                    <el-table-column
                            prop="warrantyId"
                            label="保单编号"
                    >
                    </el-table-column>
                    <el-table-column
                            prop="clientName"
                            label="客户名"
                    >
                    </el-table-column>
                    <el-table-column
                            prop="userName"
                            label="操作人"
                    >
                    </el-table-column>
                    <el-table-column
                            prop="wdate"
                            label="保单日期"
                    >
                    </el-table-column>
                    <el-table-column
                            prop="wstatus"
                            label="保单状态"
                    >
                    </el-table-column>
                    <el-table-column
                            prop="total"
                            label="保单总价"
                    >
                    </el-table-column>
                </el-table>
            </el-col>
        </el-row>
    </div>
</template>

<script>
    import NavMenu from "../components/NavMenu";
    export default {
        name: "userWarrantyQuery",
        data(){
            return{
                content:NavMenu,
                tableData:[],
                currentPage:1,
                pageSize:3,
                userName:this.$store.state.userName,
            }
        },
        mounted() {
            this.init()
        },
        methods:{
            init(){
                this.$axios.get("api/userInsuranceQuery/"+this.currentPage+"/"+this.pageSize+"/"+this.userName).then(
                    r=>{
                        console.log(r.data)
                        this.tableData=r.data.warranties
                        this.total=r.data.total
                    }
                )
            },
        }
    }
</script>

<style scoped>

</style>